import { SERVER_BASE, http } from "./config";
import qs from "qs";

export default {
    //获取期数
    getALLSchool() {
        return http.get(SERVER_BASE + "/getALLSchool");
    },
    //获取所有课程
    getALLCourse() {
        return http.get(SERVER_BASE + "/getALLCourse");
    },
    //获取所有老师
    getALLTeacher() {
        return http.get(SERVER_BASE + "/teacher/getALLTeacher");
    },
    //获取分班信息
    getClassGroup(schoolId) {
        return http.get(SERVER_BASE + "/getClassGroup?schoolId="+schoolId);
    },
    // 添加课程
    addCourse(detailList) {
        return http.post(SERVER_BASE + "/schedule/insertSchedule",detailList);
    },
    // 获取所有课程信息
    selectCourse(cg_id, week) {
        return http.get(SERVER_BASE + "/schedule/selectByCgidAndWeek?cg_id="+cg_id+"&week="+week);
    },
    // 修改课程表课程信息
    updateCourse(updateList) {
        return http.put(SERVER_BASE + "/schedule/updateSchedule",updateList);
    },
    // 删除课程表课程信息
    deleteScheule(sch_detail_id) {
        return http.delete(SERVER_BASE + "/schedule/deleteScheule",{params: sch_detail_id});
    },
};